<?php defined('SYSTEM_IN') or exit('Access Denied');?>
<?php include page('header_base');?>
<title>分销商ID大厅</title>
<link href="<?php echo RESOURCE_ROOT;?>public/weui.min.css" rel="stylesheet">
<link href="<?php echo RESOURCE_ROOT;?>public/weui.plus.css?v=2" rel="stylesheet">
<script src="<?php  echo RESOURCE_ROOT;?>eshop/static/js/clipboard.min.js"></script>
<div class="weui-cells_form" style="  margin-bottom:50px;   border-bottom: 0px solid #FFF;   margin-top: 0;">
    <div class="page_topbar" >
        <a 
        <?php if($_GET['back']){?>
		onclick="javascript:history.go(-1);"
        <?php }else{?>
        href="<?php echo create_url('mobile',array('act' => 'center','do' => 'member','m'=>'eshop'));?>"
        <?php }?>
         class="back"  style="color: #fff;text-align:center;"><i class="fa fa-angle-left"></i></a>
        <div class="title" style="color: #fff;text-align:center;">分销商ID大厅</div>
    </div>
    <div style="padding:10px;height:28px;">
        <div style="float:left;display:inline;width:82%;">
            <input id="search" style="width:98%;padding-left:2%;border-radius:5px;line-height:28px;border:1px solid #e0e0e0;" value="<?php echo $_GET['search'];?>" type="text" placeholder="请输入昵称或手机号码">
        </div>
        <div style="float:right;text-align:center;width:18%;line-height:28px;">
            <button onclick="search();" style="border:1px solid #008cd7;line-height:26px;padding:0 8px;border-radius:3px;background:#008cd7;color:#fff;">搜索</button>
        </div>
    </div>
    <div style="padding-top:10px;border-top:1px solid #e0e0e0;">
        <?php foreach((array)$udid_list as $k=>$v){?>
            <div style="margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #e0e0e0;">
                <div style="padding:0 10px;height:24px;line-height:24px;font-size:1rem;">昵称:<?php echo $v['nickname'];?></div>
                <div style="padding:0 10px;height:24px;line-height:24px;">
                    <span style="color:#999;font-size:0.8rem;">ID:<span><?php echo $v['udid'];?></span></span>
                    <span class="btn" style="float:right;display:inline;" onclick="copyText(this);">
                        <img src="<?php  echo RESOURCE_ROOT;?>eshop/static/images/copy.png" height="20">
                    </span>
                </div>
            </div>
        <?php } ?>
    </div>
</div>
<script>
    function copyText(obj){
        var clipboard = new Clipboard('.btn', {
            text: function() {
                return $(obj).prev().find('span').html();
            }
        });
        alert('复制成功');
    }
    function search(){
        var search = $('#search').val();
        window.location = "<?php  echo create_url('mobile',array('act' => 'mobile','do' => 'hall','m'=>'shopwap'))?>&search="+search;
    }
</script>
<?php  $show_footer=true;?>
<?php include page('footer_menu');?>
<?php include page('footer_base');?>